﻿#region 文件信息

// FileName: SoCafeShop/Sohobloo.SoAuth.Data/SoAuthPermissionConfiguration.cs
// Author: Sohobloo
// CreateTime: 2013/06/30 0:58
// UpdateTime: 2013/06/30 3:41

#endregion

#region 引用

using Sohobloo.SoAuth.Entity;
using Sohobloo.SoMcCoffee.Data;

#endregion

namespace Sohobloo.SoAuth.Data.Configurations
{
    public class SoAuthPermissionConfiguration : EntityConfigurationBase<SoAuthPermission>
    {
        #region 方法

        public override void Configurate()
        {
            base.Configurate();
            HasRequired(rp => rp.PermissionRole).WithMany(r => r.RolePermissions).WillCascadeOnDelete(false);
            HasRequired(rp => rp.PermissionFunction).WithMany().WillCascadeOnDelete(false);
            HasRequired(rp => rp.PermissionAction).WithMany().WillCascadeOnDelete(false);
        }

        #endregion 方法
    }
}